From d23fe7bcc37fa231b9aabe8f5566edcd6581ca6f Mon Sep 17 00:00:00 2001 From: Ariel Glenn Date: Fri, 18 Nov 2011 09:08:29 +0000 Subject: [PATCH] followup to r103448, tighten up code --- includes/Export.php | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/includes/Export.php b/includes/Export.php index 4521434e8b..dec604e5cd 100644 --- a/includes/Export.php +++ b/includes/Export.php @@ -614,17 +614,11 @@ class XmlDumpWriter { function writeContributor( $id, $text ) { $out = " \n"; - if ( $id ) { + if ( $id || !IP::isValid( $text ) ) { $out .= " " . Xml::elementClean( 'username', null, strval( $text ) ) . "\n"; $out .= " " . Xml::element( 'id', null, strval( $id ) ) . "\n"; } else { - if ( IP::isValid( $text ) ) { - $out .= " " . Xml::elementClean( 'ip', null, strval( $text ) ) . "\n"; - } - else { - $out .= " " . Xml::elementClean( 'username', null, strval( $text ) ) . "\n"; - $out .= " " . Xml::element( 'id', null, strval( $id ) ) . "\n"; - } + $out .= " " . Xml::elementClean( 'ip', null, strval( $text ) ) . "\n"; } $out .= " \n"; return $out; -- 2.20.1